#define  _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

char* reverse_string(char* string)
{
	char* pc = string;
	int len = 0;
	while (*pc != '\0')
	{
		len++;
		pc++;
	}
	int left = 0;
	int right = len - 1;
	while (left < right)
	{
		char pc1 = *(string + left);
		*(string + left) = *(string + right);
		*(string + right) = pc1;
		left++;
		right--;
	}
	return string;
}
int main()
{
	char str[] = "abcdef";
	printf("%s\n", reverse_string(str));

	return 0;
}